import React, { Component } from 'react';
import Nav from '../../components/Nav';
import { readApi } from './readApi';
import Message from './message';
import './read.css';

class Read extends Component {
    constructor(props) {
        super(props);
        this.state = {
            message: {}
        }
    }
    componentDidMount() {
        readApi().then(res => {
            this.setState({
                message: res.message
            })
        })
    }
    render() {
        return (
            <div className="page">
                <Nav title="资料查看" />
                <Message message={this.state.message} />
            </div>
        );
    }
}

export default Read;